/*
 * @Author: cola(sunshiwen)
 * @Date: 2022-04-22 09:38:34
 * @LastEditTime: 2022-07-17 17:49:59
 * @LastEditors: cola(sunshiwen)
 * @Description: 分支管理
 * @FilePath: /maycur-koa/router/branchManageRouter.js
 */
'use strict';
const { branchManageSchema } = require('../schema');
const { branchManageCtrl } = require('../controller');
// 路由列表
module.exports = [
    // 获取项目列表
    {
        method: 'get',
        path: '/branch-manage/projects',
        controller: branchManageCtrl.fetchProjectList,
    },
    // 获取主版本列表
    {
        method: 'get',
        path: '/branch-manage/master/:pid',
        controller: branchManageCtrl.fetchMasterBranchList,
        paramSchema: branchManageSchema.fetchMasterBranchList,
    },
    // 新增主版本迭代
    {
        method: 'post',
        path: '/branch-manage/master/new',
        controller: branchManageCtrl.addNewMasterBranch,
        paramSchema: branchManageSchema.addNewMasterBranch,
    },
    // 更新主版本迭代
    {
        method: 'put',
        path: '/branch-manage/master/update',
        controller: branchManageCtrl.updateMasterBranch,
        paramSchema: branchManageSchema.updateMasterBranch,
    },
    // 获取混合云分支列表
    {
        method: 'get',
        path: '/branch-manage/hybrid/:pid',
        controller: branchManageCtrl.fetchHybridBranchList,
        paramSchema: branchManageSchema.fetchHybridBranchList,
    },
    // 新增混合云分支环境
    {
        method: 'post',
        path: '/branch-manage/hybrid/new',
        controller: branchManageCtrl.addNewHybridBranch,
        paramSchema: branchManageSchema.addNewHybridBranch,
    },
    // 更新混合云分支环境
    {
        method: 'put',
        path: '/branch-manage/hybrid/update',
        controller: branchManageCtrl.updateHybridBranch,
        paramSchema: branchManageSchema.updateHybridBranch,
    },
    // 删除混合云分支
    {
        method: 'delete',
        path: '/branch-manage/hybrid/delete/:id',
        controller: branchManageCtrl.deleteHybridBranch,
        paramSchema: branchManageSchema.deleteHybridBranch,
    }
]